//
//  TitleForDetailMessageViewCell.m
//  LiveSoftware
//
//  Created by lanou3g on 15/7/20.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "TitleForDetailMessageViewCell.h"


@interface TitleForDetailMessageViewCell ()

/**
 *赛事
 */
@property(nonatomic,strong)UILabel*leagueName;

/**
 *开始时间
 */
@property(nonatomic,strong)UILabel*beginTime;

/**
 *客
 */
@property(nonatomic,strong)UILabel*visitName;


/**
 *主
 */
@property(nonatomic,strong)UILabel *hostName;


/**
 *赛果
 */
@property(nonatomic,strong)UILabel *result;
/**
 *总分
 */
@property(nonatomic,strong)UILabel*score;



/**
 *一共
 */
@property(nonatomic,strong)UILabel *total;

/**
 *gap
 */
@property(nonatomic,strong)UILabel *gap;






@end



@implementation TitleForDetailMessageViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        
        
        
        float partX = 0;
        float partY= 35;
        float partHeight = 35;
        
        CGFloat leftWidth = kScreenIp6(80);
        CGFloat rightWidth = kScreenIp6(100);
        CGFloat centerWidth = (kScreenWidth - leftWidth - rightWidth - kScreenIp6(20))/3;

 
        
        //简介
        self.teamIntro = [[UILabel alloc]initWithFrame:CGRectMake(kScreenIp6(20), 0, kScreenWidth - kScreenIp6(20), 35)];
        
        self. teamIntro.font = [UIFont systemFontOfSize:14];
        
        self.teamIntro.adjustsFontSizeToFitWidth = YES;
        
        [self.contentView addSubview:_teamIntro];
        
        
        //线
        UIView *lineView = [[UIView  alloc]initWithFrame:CGRectMake( 0, 35, kScreenWidth, 0.5)];
        
        lineView.backgroundColor = [UIColor colorWithWhite:0.699 alpha:1.000];
        
        [self.contentView addSubview:lineView];
        

        
        
        
        
        //赛事
        self.leagueName = [[UILabel alloc]initWithFrame:CGRectMake( partX, partY, leftWidth, partHeight)];
        
        self.leagueName.font = [UIFont systemFontOfSize:14];
        self.leagueName.textAlignment = NSTextAlignmentCenter;
        self.leagueName.text = @"赛事";
        self.leagueName.textColor = [UIColor grayColor];
        
        [self.contentView addSubview:_leagueName];
        
        
        
        //客
        self.visitName = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.leagueName.frame) + kScreenIp6(10), partY, centerWidth, partHeight)];
        self.visitName.font = [UIFont systemFontOfSize:14];
        self.visitName.adjustsFontSizeToFitWidth = YES;
        self.visitName.textAlignment = NSTextAlignmentCenter;
        self.visitName.text = @"客";
        self.visitName.textColor = [UIColor grayColor];
        
        [self.contentView addSubview:_visitName];
        
        //分数
        self.score = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.visitName.frame),partY,centerWidth,partHeight)];
        self.score.font = [UIFont systemFontOfSize:14];
        self.score.adjustsFontSizeToFitWidth = YES;
        self.score.textAlignment = NSTextAlignmentCenter;
        self.score.text = @"";
        
        [self.contentView addSubview:_score];
        
        
        
        
        //主
        self.hostName = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.score.frame) ,partY,centerWidth, partHeight)];
        self.hostName.font = [UIFont systemFontOfSize:14];
        self.hostName.textAlignment = NSTextAlignmentCenter;
        self.hostName.text = @"主";
        self.hostName.textColor = [UIColor grayColor];
        self.hostName.adjustsFontSizeToFitWidth = YES;
        
        [self.contentView addSubview:_hostName];
        
        
        
        //赛果
        
        self.result = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.hostName.frame) + kScreenIp6(10),partY,rightWidth/2, partHeight)];
        self.result.font = [UIFont systemFontOfSize:14];
        self.result.textAlignment = NSTextAlignmentCenter;
        self.result.text = @"赛果";
        self.result.textColor = [UIColor grayColor];
        
        [self.contentView addSubview:_result];
        
        
        //总分
        self.total = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.result.frame) - kScreenIp6(5), partY,rightWidth/2,partHeight)];
        self.total.font = [UIFont systemFontOfSize:14];
        self.total.textAlignment = NSTextAlignmentCenter;
        self.total.textColor = [UIColor grayColor];
        self.total.text = @"总分";
        
        [self.contentView addSubview:_total];
        
        
        
        //线
        UIView *footLineView = [[UIView  alloc]initWithFrame:CGRectMake( 0, 70, kScreenWidth, 0.5)];
        
        footLineView.backgroundColor = [UIColor colorWithWhite:0.699 alpha:1.000];

        
        [self.contentView addSubview:footLineView];
        
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
    }
    
    return self;
}



@end
